package com.gnerv.rabbitmq.agent.handler.factory;

import org.springframework.util.StringUtils;

public class ExecResultHandlerFactory {

    private static final String VERSION_PATH = "v_%s_%s";

    protected static String convertVersion(String version) {
        if (StringUtils.hasText(version)) {
            // 3.9.29
            String[] split = version.split("\\.");
            if (split.length >= 2) {
                return String.format(VERSION_PATH, split[0], split[1]);
            }
        }
        return "v_3_7";
    }

}
